//
//  LBTableViewItem.m
//  jslj
//
//  Created by LINAICAI on 2017/9/29.
//  Copyright © 2017年 广东联结电子商务有限公司. All rights reserved.
//

#import "LBCellItemBuilder.h"
@interface LBCellItemBuilder()
@property (nonatomic , copy )NSString *title;
@property (nonatomic , copy )UIImage *image;
@property (nonatomic , assign )LBCellItemBuilderStyle style;//类型
@property (nonatomic , copy )id attachedField;//附加字段，针对不同类型的附加字段不一样
@property (nonatomic , copy )void(^action)(void) ;
@end
@implementation LBCellItemBuilder
- (instancetype)initWithTitle:(NSString *)title
                        image:(UIImage *)image
                        style:(LBCellItemBuilderStyle)style
                attachedField:(id)attachedField
                       action:(void(^)(void))action{
    self = [super init];
    if (self) {
        _title = title;
        _image = image;
        _style = style;
        _attachedField = attachedField;
        _action = action;
    }
    return self;
}
- (instancetype)initWithTitle:(NSString *)title
                        style:(LBCellItemBuilderStyle)style
                attachedField:(id)attachedField
                       action:(void(^)(void))action{
    return [self initWithTitle:title image:nil style:style attachedField:attachedField action:action];
}
- (instancetype)initWithTitle:(NSString *)title
                        image:(UIImage *)image
                        style:(LBCellItemBuilderStyle)style
                       action:(void(^)(void))action{
    return [self initWithTitle:title image:image style:style attachedField:nil action:action];
}
- (instancetype)initWithTitle:(NSString *)title
                        style:(LBCellItemBuilderStyle)style
                       action:(void(^)(void))action{
   return [self initWithTitle:title image:nil style:style action:action];
}

@end
